package cn.dubnation.org.service.impl;

import cn.dubnation.base.service.impl.BaseServiceImpl;
import cn.dubnation.org.domain.Department;
import cn.dubnation.org.mapper.DepartmentMapper;
import cn.dubnation.org.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhu
 * @since 2023-12-29
 */
@Service
public class DepartmentServiceImpl extends BaseServiceImpl<Department> implements IDepartmentService {

    @Autowired(required = false)
    private DepartmentMapper departmentMapper;

    /**
     * 获取上级部门
     * @return
     */
    @Override
    public List<Department> getParents() {
        return departmentMapper.getParents();
    }
}
